
#ifndef _MEMBER_BCAMERA_H_
#define _MEMBER_BCAMERA_H_

#include <BOpenGL>
#include <BImage>
#include <BNode>
#include <BLight>
#include <BScene>
#include <BCamera>
#include <BFrustum>
#include <BControl>
#include "IPixmap.h"

#define camera_member(camera)		((member_BCamera*)((BCamera*)camera)->_ptr)

namespace BWE
{
	class member_BCamera
	{
	public:
		member_BCamera(BCamera* camera);
		~member_BCamera();

		void adjust();

		void frame(BScene* scene, BControl* control = 0);
		void prepareLightsForNode(BNode* node);
		void draw(BNode* node, BRender& render);
		void renderControl(BControl* control, BRender& render);

		BCamera*		boss;
		bool			ortho;
		BVector			center;
		BVector			up;
		double			left;
		double			right;
		double			top;
		double			bottom;
		double			fovy;
		double			aspect;
		double			near;
		double			far;
		bool			culling;
		BFrustum		frustum;

		BColor			baseColor;
		BImageHolder	baseImage;
		BImageHolder	photoImage;
		IPixmapHolder	pixmap;
		BScene*			scene;
	};
}

#endif
